# -*- coding: utf-8 -*-
from django.contrib import admin
from django_moneyguard import models


admin.site.register(models.Currency)
admin.site.register(models.Family)
admin.site.register(models.FamilyMember)
admin.site.register(models.Account)


class SubCategoryInline(admin.StackedInline):
    model = models.Subcategory
    extra = 1


class CategoryAdmin(admin.ModelAdmin):
    fieldsets = [(None, {'fields': ['type', 'name', 'active', 'family']}), ]
    inlines = [SubCategoryInline]
    list_display = ('name',)

admin.site.register(models.Category, CategoryAdmin)
admin.site.register(models.Subcategory)
admin.site.register(models.AccountTransactions)
admin.site.register(models.CreditCard)
admin.site.register(models.CreditCardPurchase)
admin.site.register(models.CreditCardTransaction)
admin.site.register(models.CurrencyQuote)
admin.site.register(models.CreditCardSummary)
admin.site.register(models.AutomaticDebitCreditCard)
admin.site.register(models.AutomaticDebitAccount)
